package com.mt.mtyx.sys.controller;

import com.mt.mtyx.common.result.Result;
import com.mt.mtyx.entity.sys.Ware;
import com.mt.mtyx.sys.service.WareService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author WMT
 * @Date 2023/7/18 13:19
 */
@Api(tags = "仓库")
@RequestMapping("/admin/sys/ware")
@RestController
public class WareController {

    @Autowired
    private WareService wareService;

    @ApiOperation("获取所有仓库列表")
    @GetMapping("/findAllList")
    public Result<List<Ware>> getAllList() throws Exception {
        return Result.success(wareService.list());
    }
}
